package com.company.project.dao;

import com.company.project.core.Mapper;
import com.company.project.model.Authority;
import com.company.project.model.RoleAuthority;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AuthorityMapper extends Mapper<Authority> {

    //后台功能导航
    List<Authority> selectAction(@Param("name") String name, @Param("pwd") String pwd);

    /**
     * 删除权限
     */
    Boolean deleteAuthority(@Param("rid") Integer rid, @Param("parentid") Integer parentid);

    /**
     * 删除后更新
     * @param roleAuthority
     * @return
     */
    Boolean upAuthority(RoleAuthority roleAuthority);

    /**
     * 添加权限
     */
    Boolean addAuthority(RoleAuthority roleAuthority);

    /**
     * 查询添加的权限
     * @return
     */
    List<Authority> selectAuthorityAll();

    /**
     * 查询所有权限
     */
    List<Authority> Function();


    /**
     * 查询二级菜单
     * @param id
     * @return
     */
    List Submenu(@Param("id") String id);
}